dis=float(input("输入公里数："))
dan=2.3
if dis <=3 :
  print("费用13元")
elif 3<dis<=15 :
  fy1=(dis-3)*dan
  fy2=fy1+13
  print("费用为%.2f元" %fy2)
else  :
  fy1=(dis-15)*dan*(1+0.5)
  fy2=(15-3)*dan
  fy3=fy1+fy2+13
  print("费用为%.2f元" %fy3)
